home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
2325
/
2325.xpi
/
chrome
/
content
/
one-riot-suggestion.xul
< prev
next >
Wrap
Extensible Markup Language
|
2009-11-24
|
3KB
|
62 lines
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin/global.css"?>
<!DOCTYPE dialog SYSTEM "chrome://rss-ticker/locale/locale.dtd">
<dialog title="&trendsTitle;"
id="rssticker-oneriot-dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons="accept,cancel"
buttondisabledaccept="true"
ondialogaccept="return subscribeToFeed();"
ondialogcancel="return cancelSearchProvider();">
<script type="application/x-javascript">
<![CDATA[
var feedUrl = "http://www.oneriot.com/rss/trendingtopics?&spid=86f2f5da-3b24-4a87-bbb3-1ad47525359d&p=rss-ticker&ssrc=ticker";
var subscribeToFeed = function() {
if (document.getElementById("understand").checked) {
var strings = document.getElementById("RSSTICKER-bundle");
var livemarkService = Components.classes["@mozilla.org/browser/livemark-service;2"];
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
var bmsvc = Components.classes["@mozilla.org/browser/nav-bookmarks-service;1"].getService(Components.interfaces.nsINavBookmarksService);
var annotationService = Components.classes["@mozilla.org/browser/annotation-service;1"].getService(Components.interfaces.nsIAnnotationService);
var livemarkService = Components.classes["@mozilla.org/browser/livemark-service;2"].getService(Components.interfaces.nsILivemarkService);
var menu = Application.bookmarks.menu;
var uri = ioService.newURI(feedUrl, null, null);
var feedUri = ioService.newURI(feedUrl, null, null);
var lm = livemarkService.createLivemarkFolderOnly(Application.bookmarks.menu.id, strings.getString("trendBookmarkTitle"), uri, feedUri, -1);
annotationService.setItemAnnotation(lm, "bookmarkProperties/description", strings.getString("trendBookmarkDescription"), 0, Components.interfaces.nsIAnnotationService.EXPIRE_NEVER);
}
return true;
}
var cancelSearchProvider = function () {
if (document.getElementById("understand").checked) {
document.getElementById("understand").checked = false;
document.getElementById('rssticker-oneriot-dialog').setAttribute('buttondisabledaccept', true);
return false;
}
return true;
}
]]>
</script>
<stringbundleset>
<stringbundle id="RSSTICKER-bundle" src="chrome://rss-ticker/locale/locale.properties" />
</stringbundleset>
<hbox>
<vbox>
<image src="chrome://rss-ticker/content/skin-common/search-trio.png" style="padding: 20px;"/>
</vbox>
<vbox style="width: 350px; padding-left: 20px;" align="center" pack="center">
<description>&trendsP1;</description>
<description>&trendsP2;</description>
<description>&trendsP3;</description>
<hbox align="center">
<checkbox id="understand" label="&checkbox_understand;" oncommand="document.getElementById('rssticker-oneriot-dialog').setAttribute('buttondisabledaccept', !this.checked);" />
</hbox>
</vbox>
</hbox>
</dialog>